<template>
    <div>
        <nt-row class="title_main">
            <nt-col :span="12">我的亚马逊收款账户</nt-col>
            <nt-col :span="12" align="right"><nt-button type="primary" @click="addAmazon">+申请新的账户</nt-button></nt-col>
        </nt-row>
        <nt-table :data="accountList" class="dialog_table mT24">
            <nt-table-column label="9位汇款路线 (9 Digital Routing Number)">

                <!-- <template scope="scope">
                            <p v-if="scope.row.account_number">{{scope.row.account_number}}</p>
                    <p v-else> - </p>
                        </template> -->
            </nt-table-column>
            <nt-table-column label="银行账号 (Bank Account Number)">
                <!-- <template scope="scope">
                            {{scope.row.account_number}}
                        </template> -->
            </nt-table-column>
            <nt-table-column label="账户持有人姓名 (Account Holder Name)">
                <!-- <template scope="scope">
                            {{scope.row.account_holder_name}}
                        </template> -->
            </nt-table-column>
            <nt-table-column label="状态">
                <!-- <template scope="scope">
                            {{scope.row.account_holder_name}}
                        </template> -->
            </nt-table-column>
        </nt-table>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                accountList: []
            }
        },
        mounted() {
            this.requestGetVirtualBankAccountsList();
        },
        methods: {
            addAmazon() {
                this.$router.push('/main/requestAmazon');
            },
            //接口请求---获取银行账户列表
            async requestGetVirtualBankAccountsList() {
                let params = {};
                params.accountId = this.ctx.store.get('account_id');

                let result = await this.ctx.models.settlement.getVirtualBankAccountsList(params, this.ctx);

                if (result.statusCode == 200) {
                    this.accountList = result.data;
                }
            },
        }
    }
</script>

<style scoped>
    .add_bank_card_page {
        width: 800px;
        height: 30px;
        margin: 10px auto;
    }
</style>